package com.linjiahao.eduservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.linjiahao.eduservice.entity.EduComment;
import com.linjiahao.eduservice.mapper.EduCommentMapper;
import com.linjiahao.eduservice.service.EduCommentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 评论 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2020-09-07
 */
@Service
public class EduCommentServiceImpl extends ServiceImpl<EduCommentMapper, EduComment> implements EduCommentService {

    @Override
    public int findBycourseId(String courseId) {
        Integer sum = this.baseMapper.selectCount(new QueryWrapper<EduComment>().eq("course_id", courseId));
        return sum;
    }
}
